#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/3/18 20:54
# @Author  : Chenmm
# @File    : pdf.py
# @Software: PyCharm

import os
from flask import Blueprint, request, render_template, jsonify, current_app

from applications.common.utils.http import fail_api, success_api, table_api
from applications.common.utils.rights import authorize



bp = Blueprint('adminPdf', __name__, url_prefix='/pdf')


#  图片管理
@bp.get('/')
@authorize("system:pdf:main")
def index():
    return render_template('system/pdf/pdf.html')


#  图片数据
@bp.get('/table')
@authorize("system:pdf:main")
def table():
    page = request.args.get('page', type=int)
    limit = request.args.get('limit', type=int)
    # data, count = upload_curd.get_photo(page=page, limit=limit)
    data = []
    count = 0
    return table_api(data=data, count=count)

